home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 July
/
EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso
/
earcd
/
comm
/
ums
/
pint.lha
/
UMS
/
Rexx
/
CancelMsg.pint
< prev
next >
Wrap
Text File
|
1997-03-04
|
2KB
|
92 lines
/*
$VER: CancelMsg.pint 1.3 (12.3.96)
Author:
Matthias Scheler <tron@lyssa.owl.de>
Martin Koyro <mk@bones.westfalen.de>
Updated for PINT (22.2.97):
Magnus Heino (nd95mho@Student.HGS.SE)
Function:
generates a cancel-msg for a usenetarticel.
History:
1.0 Initial version.
1.1 Control-line is now quoted.
1.2 Asks if the message should be canceled.
The message will be deleted after the cancel is generated.
1.3 Article window is updated with "REMOVEDELETED",
"Approved:" header missing in previous versions is generated now.
Requires:
UMS, PINT 2.0
Example for "ums.config":
( PINT.Rexx
...
"#?Window F6 CancelMsg.pint\n"
...
)
*/
OPTIONS RESULTS
CALL ADDLIB('ums.library',0,-210,11)
CALL UMSInitConsts()
STATUS
IF RESULT~='MESSAGE' THEN EXIT 5
GETACCOUNT
OldAccount=RESULT
Account=UMSDupAccount(OldAccount)
GETMSGNUM
MsgNum=RESULT
DROP Fields.
IF UMSReadMsgHeader(Account,MsgNum,Fields.,TRUE) THEN
DO
IF Symbol('Fields.UMSCODE_GROUP')='VAR' THEN
DO
IF UMSReadMsgInfo(Account,MsgNum,info.) THEN
DO
IF BitTst(info.USERSTAT,UMSUSTAT_OWNER) THEN
DO
User=UMSReadConfig(Account,"rfc.username")
IF User="" THEN User="nobody"
Domain=UMSReadConfig(Account,"rfc.domainname")
IF Domain="" THEN Domain="no.where"
'REQUEST "CancelMsg" "**_Yes|No" "Cancel this message?"'
IF RESULT=1 THEN
DO
DROP newmsg.
newmsg.UMSCODE_MSGID ="cancel"||"."||Fields.UMSCODE_MSGID
newmsg.UMSCODE_GROUP =Fields.UMSCODE_GROUP
newmsg.UMSCODE_SUBJECT ="cmsg cancel <"||Fields.UMSCODE_MSGID||">"
newmsg.UMSCODE_MSGTEXT ="Canceled by author."||D2C(10)
newmsg.UMSCODE_RFCATTR ='"Control: cancel <'||Fields.UMSCODE_MSGID||'>" '||'"Approved: '||User||'@'||Domain||'"'
IF UMSWriteMsg(Account,newmsg.)~=0 THEN
DO
'REQUEST "CancelMsg" "**_OK" "Cancel generated!"'
IF ~UMSDeleteMsg(Account,msgnum) THEN 'REQUEST "CancelMsg" "**_OK" "Can not delete message!"'
ELSE 'REMOVEDELETED'
END
END
END
ELSE 'REQUEST "CancelMsg" "**_OK" "You are not the owner of this message!"'
END
END
END
CALL UMSLogout(Account)